package com.budwk.app.waterquality.models;

import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@Table("waterquality.wk_file_info")
@Comment("文件存储信息表")
@ApiModel(description = "文件存储信息表")
public class FileInfo extends BaseModel implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column
    @Name
    @Comment("编号")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    @PrevInsert(els = {@EL("snowflake()")}, nullEffective = true)
    private String id;

    @Column("file_name")
    @Comment("文件名称")
    @ApiModelProperty(description = "文件名称")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String fileName;

    @Column("upload_file_name")
    @Comment("上传文件名称")
    @ApiModelProperty(description = "上传文件名称")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String uploadFileName;

    @Column("upload_time")
    @Comment("上传时间")
    @ApiModelProperty(description = "上传时间")
    @ColDefine(type = ColType.DATETIME, width = 120)
    private LocalDateTime uploadTime;

    @Column("upload_by")
    @Comment("上传人")
    @ApiModelProperty(description = "上传人")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String uploadBy;

    @Column("upload_name")
    @Comment("上传人姓名")
    @ApiModelProperty(description = "上传人姓名")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String uploadName;

    @Column("path")
    @Comment("存储路径")
    @ApiModelProperty(description = "存储路径")
    @ColDefine(type = ColType.VARCHAR, width = 300)
    private String path;

    @Column("opinion")
    @Comment("说明")
    @ApiModelProperty(description = "说明")
    @ColDefine(type = ColType.VARCHAR, width = 500)
    private String opinion;

    @Column("remark")
    @Comment("备注")
    @ApiModelProperty(description = "备注")
    @ColDefine(type = ColType.VARCHAR, width = 500)
    private String remark;

    @Column("file_type")
    @Comment("文件类型")
    @ApiModelProperty(description = "文件类型")
    @ColDefine(type = ColType.VARCHAR, width = 500)
    private String fileType;
}
